#ifndef UTILITY_H
#define UTILITY_H

template <typename VectorType>
VectorType Normalize (const VectorType& coord)
{
    float distance = sqrt (coord.x * coord.x + coord.y * coord.y);
    return VectorType (coord.x / distance, coord.y /distance);
}

template <typename VectorType>
float VectorDistance2D (const VectorType& coord)
{
    return sqrt (coord.x * coord.x + coord.y * coord.y);
}


#endif //UTILITY_H
